package com.ziroom.tech.spring.dubbo.consumer;

import com.ziroom.tech.spring.dubbo.provider.DemoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author dongl50@ziroom.com
 * @date 31/12/2017 12:49 PM
 * @since 1.0
 */
public class Consumer {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {
                "META-INF/spring/dubbo-demo-consumer.xml"
        });

        context.start();

        DemoService demoService = (DemoService) context.getBean("demoService");

        String hello = demoService.sayHello("world");

        System.out.println(hello);
    }
}
